package net.sourceforge.ehep.core;

import static org.junit.Assert.*;

import java.util.Vector;

import org.junit.Test;

public class WatermarkerTest {

	@Test
	public void testWatermarker() {
		Vector<String> wOptions = new Vector<String>();
		wOptions.add("ADD");
		wOptions.add("REMOVE");
		wOptions.add("VERIFY");
		String[] act = new String[wOptions.size()];
		wOptions.toArray(act);
		
		Watermarker wmarker = new Watermarker();
		String[] exp = new String[wmarker.getWatermarkOptions().size()];
		wmarker.getWatermarkOptions().toArray(exp);
		
		assertArrayEquals(exp, act);
	}

	@Test
	public void testGetWatermarkOptions() {
		Vector<String> wOptions = new Vector<String>();
		wOptions.add("ADD");
		wOptions.add("REMOVE");
		wOptions.add("VERIFY");
		String[] exp = new String[wOptions.size()];
		wOptions.toArray(exp);
		
		Watermarker wmarker = new Watermarker();
		String[] act = new String[wmarker.getWatermarkOptions().size()];
		wmarker.getWatermarkOptions().toArray(act);
		
		assertArrayEquals(exp, act);
	}

	@Test
	public void testGetWatermark_Sign() {
		String[] exp = new String[]{"S","I","G","N","A","T","U","R","E"};
		
		Watermarker wmarker = new Watermarker();
		Vector<String> wSign = wmarker.getWatermark_Sign();
		String[] act = new String[wSign.size()];
		wSign.toArray(act);
		
		assertArrayEquals(exp, act);
	}

}
